import QtQuick 2.0
//import QtGraphicalEffects 1.0

//import "./common/"

Item {
    id: root
    width: gWidth
    height: gHeight

    property real gWidth: bug.width
    property real gHeight: bug.height

    property int num: 2

    Timer{
        running: true
        interval: 50
        repeat: true
        onTriggered: {
            if(num > 2) num--
            else num = 60
        }
    }

    Item{
        id: bug
        width: img.wdith
        height: img.height
        z: 1
        Image {
            id: img
            source: "qrc:/image/image/bg.png"
            sourceSize: Qt.size(img.width, img.height)
            smooth: true
        }
    }

    Rectangle{
        id: mask
        x: 50
        y: 125
        width: 110
        height: width
        color: Qt.rgba(223/255,230/255,240/255,1)

        Image {
            anchors.centerIn: parent
            source: "qrc:/image/image/"+String(num) + ".png"    // 2 - 60
            sourceSize: Qt.size(80, 80)
            fillMode: Image.Stretch
            cache: true
        }
    }

}
